import { defineStore } from "pinia"
import { ref } from 'vue'

export const useBusinessInfoStore = defineStore(
    'businessInfo',
    () => {
        //定义businessInfo
        const businessInfo = ref({})

        //设置businessInfo的值
        function setBusinessInfo (newBusinessInfo: any) {
            businessInfo.value = newBusinessInfo
        }

        //移除businessInfo的值
        function removeBusinessInfo () {
            businessInfo.value = {}
        }

        return {
            businessInfo, setBusinessInfo, removeBusinessInfo
        }
    },
    {
        persist:true
    }
)